package com.yq.cns.net

import com.yq.cns.BuildConfig
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

/**
 * @author: user
 * @date: 2022/11/16
 */

private val okHttpClient by lazy {
    OkHttpClient.Builder()
        .build()
}

private val retrofit by lazy {
    Retrofit.Builder()
        .client(okHttpClient)
        .addConverterFactory(GsonConverterFactory.create())
        .baseUrl(ApiUrl.BASE_NES)
        .build()
}

object NewsApiService : NewsApi by retrofit.create(NewsApi::class.java)


